def equi(A):
  size = len(A)
  index1 =  size/2
  sum1 = 0
  sum2 = 0
  for i in range (0, index1):
    sum1 = sum1 + A[i]
  for i in range(index1+1, size):
    sum2 =  sum2 + A[i]
  out = [] 
  if sum1 == sum2:
    out.append(index1)
  tempSum1 = sum1
  tempSum2 = sum2
  tempIndex = index1
  while i > 0:
    index1 = index1 - 1
    if (sum1 - A[index1] ) == (sum2 + A[index1 +1]):
      out.append(index1)
  if A[0] == sum2:
    out.append(0)
  sum1 = tempSum1 
  sum2 = tempSum2
  index1 = tempIndex
  while i < (size - 1):
    index1 = index1 + 1
    if (sum1 + A[index1 - 1] ) == (sum2 - A[index1 +1]):
      out.append(index1)
  if A[size - 1] == sum1:
    out.append(size-1)
  return out


if __name__ == 'main':
  A = [-7,1,5,2,-4,3,0]
  print 'out ' + str(equi(A))